package com.example.zhanglinan.vrdemo.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * @author Schutzengel
 *         o(＞﹏＜)o
 *         create on 2017/1/27 14:20
 *         $desc$
 */
public class MyViewPager extends FragmentPagerAdapter {
    private List<Fragment> fragments;

    public MyViewPager(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
